package com.yehuishou.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yehuishou.pojo.Brand;
import com.yehuishou.pojo.Classify;
import com.yehuishou.pojo.Configurations;
import com.yehuishou.pojo.EnterpriseBack;
import com.yehuishou.pojo.ImageFile;
import com.yehuishou.pojo.Item_order;
import com.yehuishou.pojo.Models;
import com.yehuishou.pojo.QueryVO;
import com.yehuishou.pojo.ShoppingTrolley;
import com.yehuishou.pojo.Oditem;
import com.yehuishou.pojo.Order;

/**
 * 出售商品订单接口
 * @author VULCAN
 *
 */
public interface SaleOrderDao {
		
	//查询用户订单
	List<QueryVO> findUserOrder(QueryVO vo);
	//删除用户订单
	int deleteUser(QueryVO vo);
	//查询图片信息
	ImageFile findImage(Integer ii);
	//ID 查询商品信息
	List<Oditem> finditems(String oid);
	//查询主图片
	ImageFile selimg(Integer imgid);
	//通过ID 查询单个订单详情 用于修改
	Oditem FindDetailsById(Oditem oditem);
	//出售订单详情修改
	Integer UpdateDetails(Oditem oditem);
	Integer UpdateConfiguration(Oditem oditem);
	//删除订单详情
	Integer detailsDelete(Integer i_id);
	//查询所有商品分类
	List<Classify> selclassify();
	//查询所有品牌
	List<Brand> selbrand();
	//查询所有商品型号
	List<Models> selmodel();
	//添加中间表
	int addOrderItem(Item_order item_order);
	//添加到购物车
	int addOrderCat(ShoppingTrolley shopt);
	//添加订单
	int addOrder(Order order);
	//查询支付订单
	List<Order> selpayorder(String oid);
	//删除购物车数据
	int deleShoppingTrolley(Integer stidd);
	//查询个人购物车订单
	List<Order> selShoppingTrolley(Integer uid);
	//查询个人其他订单
	List<Order> selorder(@Param("uid")Integer uid, @Param("order_type")Integer order_type);
	//删除订单
	int deleorder(Item_order item_order);
	//删除订单商品中间表
	int deleitem_order(Item_order item_order);
	//查询订单商品中间表
	List<Item_order> selitem_order(String oid);
	//查询回收商品订单
	List<Order> selbackorder(@Param("uid")Integer uid, @Param("order_type")Integer order_type);
	//确定金额
	int assess(Order order);
	//删除回收中间表
	int delebackorder(Item_order item_order);
	//删除租赁中间表
	int deleleaseorder(Item_order item_order);
	//删除竞价表
	int delebiddingorder(Item_order item_order);
	//删除竞价中间表
	int delebidorder(Item_order item_order);
	//支付完成出售商品库存减少
	void stocknumdown(Configurations con);
	void kdeit(Order ord);
	Order findByO(String oid);
	//企业回收订单
	List<EnterpriseBack> selenterpriseBacks(Integer uid);
	int deleenterpriseBacks(Integer id);
	
}
